package com.lap.auth.application.api.dto;

import com.lap.framework.common.dto.AbstractDto;
import io.swagger.v3.oas.annotations.media.Schema;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Data
@Schema(description = "接口访问日志数据传输")
public class ApiViewLogDto extends AbstractDto {

  @Schema(description = "唯一标识")
  private Integer id;

  @Schema(description = "管理员")
  private Integer userId;

  @Schema(description = "用户名")
  private String userName;

  @Schema(description = "姓名")
  private String fullName;

  @Schema(description = "访问实例")
  private String targetServer;

  @Schema(description = "访问协议")
  private String protocol;

  @Schema(description = "访问地址")
  private String requestPath;

  @Schema(description = "访问方法")
  private String requestMethod;

  @Schema(description = "访问者浏览器")
  private String browser;

  @Schema(description = "访问者操作系统")
  private String clientOs;

  @Schema(description = "访问来源IP")
  private String requestIp;

  @Schema(description = "访问来源地区")
  private String requestAddress;

  @Schema(description = "访问入参")
  private String requestBody;

  @Schema(description = "请求开始时间")
  private LocalDateTime requestTime;

  @Schema(description = "请求结束时间")
  private LocalDateTime responseTime;

  @Schema(description = "访问返回值")
  private String responseData;

  @Schema(description = "访问耗时")
  private Long times;
}
